package java_basic.t1_objectandclasses;

/*public class Puppy {

	public Puppy (String name){
		//This constructor has one parameter, name
		System.out.print("Passes name is: " + name);
	}
	
	*//**
	 * @param args
	 *//*
	public static void main(String[] args) {
		// Fowllowing statement would create an object myPuppy
		Puppy myPupy = new Puppy("Tommy");

	}

}*/


//This example explains how to access instance variable and method of a class
/*public class Puppy{
	int puppyAge;
	
	public Puppy(String name){
		System.out.println("Passed name is: " + name);
	}
	
	public void setAge(int age){
		puppyAge = age;
	}
	
	public int getAge(){
		System.out.println("Puppy's age is: " + puppyAge);
		return puppyAge;
	}
	
	public static void main(String []args){
		*//** Object creation *//*
		Puppy myPuppy = new Puppy("Tommy");
		
		*//** Call class method to set puppy's age *//*
		myPuppy.setAge(2);
		
		*//** Call another class method to get puppy's age *//*
		myPuppy.getAge();
		
		*//** You can access instance variable as follows as well *//*
		System.out.println("Variable value: " + myPuppy.puppyAge);
	}
}*/

